package com.mornd.gulimall.coupon.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mornd.gulimall.common.core.entity.PageEntity;
import com.mornd.gulimall.common.core.validation.UpdateGroup;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 秒杀活动场次
 * </p>
 *
 * @author mornd
 * @since 2023-08-05
 */
@Getter
@Setter
@TableName("sms_seckill_session")
public class SeckillSession extends PageEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @NotNull(groups = {UpdateGroup.class})
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 场次名称
     */
    @NotBlank
    private String name;

    /**
     * 每日开始时间
     */
    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 每日结束时间
     */
    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 启用状态
     */
    @NotNull
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;


}
